package com.jxpanda.spring.module.wechat.component.http.base;

import lombok.Getter;
import org.springframework.http.HttpMethod;

/**
 * @author Panda
 */
@Getter
public class WechatHttpRequest<R> {

    private final String url;

    private final HttpMethod method;

    private final Object query;

    private final Object body;

    private final Class<R> returnType;

    WechatHttpRequest(WechatApi<?, ?, R> wechatApi, Object query, Object body) {
        this.url = wechatApi.getUrl();
        this.method = wechatApi.getMethod();
        this.returnType = wechatApi.getReturnType();
        this.query = query;
        this.body = body;
    }

}
